package DesignPattern.Link;

/**
 * @Author: zhenghuisheng
 * @Date: 2022/9/11 21:18
 */
public class SchoolMasterApprover extends Approver {
    public SchoolMasterApprover(String name) {
        super(name);
    }

    @Override
    public void processApprover(ApproverRequest approveRequest) {
        if (approveRequest.getPrice() > 30000) {
            System.out.println(" 请求编号 id= " + approveRequest.getId() + " 被 " + this.name + " 处理");
        } else {
            System.out.println(this.name + "处理不了");
            this.next.processApprover(approveRequest);
        }
    }
}
